<h2>New Post</h2>
<% if params[:preview_button] && @post.errors.empty? %>
  <div id="preview">
    <%= render :partial => 'post', :object => @post %>
  </div>
<% end %>
<%= error_messages_for :post %>
<% form_for @post do |f| %>
  <%= f.hidden_field :topic_id %>
  <p>
   <label for="post_content">Content:</label><br />
    <%= f.text_area :content, :tabindex => tabindexer %>
  </p>
  <p>
    <%= submit_tag 'Create', :name => 'create_button', :tabindex => tabindexer %>
    <%= submit_tag 'Preview', :name => 'preview_button', :tabindex => tabindexer %>
    <%= cancel_button topic_path(@post.topic_id) %>
  </p>
<% end %>
